The utility functions described in this section provide access to Windows data structures that QuickTime uses as part of its implementation.
CreatePortAssociation associates a graphics port (a data structure of type GrafPort ) with an onscreen native window.
GrafPtr CreatePortAssociation(void *theWnd, Ptr wStorage, long flags);
The CreatePortAssociation function associates a QuickDraw graphics port with an onscreen window. The graphics port provides a drawing context for QuickTime and QuickDraw. In addition, QuickTime hooks the native window, so that any window state changes are reflected in the associated graphics port. Before you dispose of the native window, call DestroyPortAssociation .
DestroyPortAssociation removes the graphics port associated with an onscreen window.
void DestroyPortAssociation(CGrafPtr cgp);
The DestroyPortAssociation function removes the graphics port associated with an onscreen native window. This association was established previously via the CreatePortAssociation call. The DestroyPortAssociation function unhooks the native window WndProc and deallocates and window storage. Call this function before you destroy the native window.
The GetHWNDPort function gets a Mac OS graphics port pointer for a Windows HWND window handle.
GrafPtr GetHWNDPort(void *theHWND);
The GetPortHPALETTE function returns a HPALETTE.
void *GetPortHPALETTE(GrafPtr port);
The GetPortHFONT function returns a handle to the currently-selected Windows font.
void *GetPortHFONT(GrafPtr port);
The QTGetDDObject function returns the Direct Draw object currently in use by QuickTime.
OSErr QTGetDDObject(void **lpDDObject);
The QTSetDDObject function sets the DirectDraw object currently in use by QuickTime.
OSErr QTSetDDObject(void *lpNewDDObject);
This function is useful for developers who want to call DirectDraw methods directly.
The QTSetDDPrimarySurface function allows you to set the primary DirectDraw surface used by QuickTime.
OSErr QTSetDDPrimarySurface(void *lpNewDDSurface, unsigned long flags);
InitializeQHdr initializes a Windows QHdr data structure for use by the Toolbox.
void InitializeQHdr(QHdr *qhdr);
The InitializeQHdr function initializes the various fields of the Windows queue header to startup values and associates a mutex with the queue to provide safe access via the Toolbox Enqueue and Dequeue routines. The mutex identifier is stored in the MutexID field of the QHdr . Your application or component is not required to manage this mutex; the Toolbox functions Enqueue and Dequeue will handle this for you. A QHdr structure is typically used by QuickTime image decompressor components to manage frame queues. Once you are done with the queue, call TerminateQHdr to free the mutex.
InitializeQHdr terminates a Windows QHdr data structure.
void TerminateQHdr (QHdr *qhdr);
The IsTaskBarVisible routine returns the current visibility state of the taskbar.
Boolean IsTaskBarVisible(void);
The ShowHideTaskBar routine shows or hides the Windows taskbar.
void ShowHideTaskBar(Boolean showIt);
This call can be used to hide the taskbar during full-screen movie playback.
The QTMLAcquireWindowList function acquires exclusive access to the global list of (Macintosh-style) windows, so that the list will not change until you call QTMLReleaseWindowList .
void QTMLAcquireWindowList( void );
If you want to call the LMGetWindowList function or the FrontWindow function and then proceed to walk down the next pointers, you need to protect yourself against another thread modifying the list while you walk. Call the QTMLAcquireWindowList function before and the QTMLReleaseWindowList routine after.
The QTMLReleaseWindowList function allows other threads to modify the global list of (Macintosh-style) windows again.
void QTMLReleaseWindowList( void );
| Previous | Chapter Contents | Chapter Top | Next |